Clinical Trials Process API - Implementation Template
Setup guide
Prerequisites
Veeva CTMS Configuration
Create a custom object named extract_config__c and insert the object names and its field in the table for CTMS Full load and Delta load uses this custom object to retrieve the objects data from CTMS.
Creating a custom object in Veeva
- Login into the Veeva CTMS system.
- Navigate Admin (Top Right side, Gear Icon) --> Configuration --> OBJECT SETUP --> Objects.
Click on Create button and provide following details.
Object Label: extract config.Object Plural Label: extract configs.Object Name: extract_config.Status: Active.Under Options: EnableAudit data changes in this objectand any others optionally.Lifecycle: Select/create appropriate Lifecycle. Example: Study Organization Lifecycle.
Click on `Save' button.
Navigate to
Fieldstab, click onCreatebutton to create the following fields.object_name- Select field type as Text and Maximum Length of 50 chars. This field will have the actual name of the Veeva CTMS object. Example: subject__clin or study__v.isactive- Select field type as Yes/No. This field will determine whether the data for the particular object to be retrieved.extract_fields- Select field type as Text and Maximum Length of 2000 chars. This field will have the list of all fields to be extracted from an object with a delimiter of ',' (comma). Example: name__v, study__clin.relationship_fields- Select field type as Text and Maximum Length of 1500 chars. This field will have the list of all relationship fields to be extracted from an object with a delimiter of ',' (comma). Ex value: study__clinr.name__v,arm__vr.name__v.hasPicklist- Select field type as Yes/No. This field will determine whether the extract_fields in an object has any picklists.picklist_names- Select field type as Text and Maximum Length of 1500 chars. This field will have the list of picklist names for the picklist fields in an object with a delimiter of '~'. Example: status__v ~ default_status__v.
Importing Templates into Anypoint Studio
- In Studio, click the Exchange X icon in the upper left of the taskbar.
- Log in with your Anypoint Platform credentials.
- Search for the template.
- Click Open.
Common Configuration
mule.env- sets the environment where the application is to be deployed. For a studio deployment, the recommended mule.env value islocal.mule.key- sets the encryption password to be used for encrypting secure properties. Update as needed.api.autodiscoveryIDshould be configured inconfig-<mule.env>.yamlfile.
Please refer to the attached link on how to secure the configuration properties.
HTTPS Configuration
https.host— sets the service host interface. It should be configured inconfig-<mule.env>.yamlfile. (Defaults to 0.0.0.0 for all interfaces).https.port— sets the HTTPS service port number. It should be configured inconfig-<mule.env>.yamlfile. (Default 8082).- TLS Configuration - Keystore properties setup:
keystore.alias- sets the alias to the keystore. It should be configured inconfig-<mule.env>.yamlfile.keystore.path- sets the path to the key file. Key should be availabe in /src/main/resources/keystore. It should be configured inconfig-<mule.env>.yamlfile.keystore.keypass— sets keystore keypass to support HTTPS operation. It should be encrypted and configured inconfig-secured-<mule.env>.yamlfile.keystore.password— sets keystore password to support HTTPS operation. It should be encrypted and configured inconfig-secured-<mule.env>.yamlfile.
Please refer to the attached link on how to generate the Keystore.
Clinical Trials Application Configuration
The application requires a few things to be configured, mainly the multiple system API connections information. Configure them in the properties file located in the config/properties folder.
veeva.ctms-sys-api.hostshould be configured inconfig-<mule.env>.yamlfile. URL for an instance of Veeva CTMS.veeva.cdms-sys-api.hostshould be configured inconfig-<mule.env>.yamlfile. URL for an instance of Veeva CDMS.veeva.cdms-sys-api.extractUrlshould be configured inconfig-<mule.env>.yamlfile for your specific Veeva CDMS instance's url of Submit Extract Job request URL.veeva.cdms-sys-api.jobStatusUrlshould be configured inconfig-<mule.env>.yamlfile for your specific Veeva CDMS instance's url of Job Status request URL.veeva.cdms-sys-api.studiesUrlshould be configured inconfig-<mule.env>.yamlfile for your specific Veeva CDMS instance's url of Studies request URL.veeva.cdms-sys-api.cdmsDemograhicsshould be configured inconfig-<mule.env>.yamlfile for a custom name of CDMS demographics dataset.veeva.cdms-sys-api.cdmsVitalSignsshould be configured inconfig-<mule.env>.yamlfile for a custom name of CDMS vital signs dataset.veeva.cdms-sys-api.cdmsDemograhicsshould be configured inconfig-<mule.env>.yamlfile for a custom name of CDMS physical exam dataset.veeva.cdms-sys-api.cdmsSubjectsshould be configured inconfig-<mule.env>.yamlfile for a custom name of CDMS subjects dataset.veeva.cdms-sys-api.cdmsAdverseEventsshould be configured inconfig-<mule.env>.yamlfile for a custom name of CDMS adverse events dataset.veeva.cdms-sys-api.extactFileNameshould be configured inconfig-<mule.env>.yamlfile for a custom name of the resultant export file from CDMS.veeva.cdms-sys-api.extactFileTypeshould be configured inconfig-<mule.env>.yamlfile for a custom name of the resultant export file type from CDMS.veeva.cdms-sys-api.veevaAPIVersionshould be configured inconfig-<mule.env>.yamlfile for Veeva CDMS Rest API version.scheduler.ctms.full-loadshould be configured inconfig-<mule.env>.yamlfile. Modify to match the schedule desired for CTMS full load.scheduler.ctms.delta-loadshould be configured inconfig-<mule.env>.yamlfile. Modify to match the schedule desired for CTMS delta load.scheduler.ctms.delta-load-default-from-datatimeshould be configured inconfig-<mule.env>.yamlfile. Modify to match the schedule desired for CTMS delta load uses this data as from date.scheduler.cdms.full-loadshould be configured inconfig-<mule.env>.yamlfile. Modify to match the schedule desired for CDMS full load.target-sys-api.hostshould be configured inconfig-<mule.env>.yamlfile. URL for your instance of target system api.target-sys-api.pathshould be configured inconfig-<mule.env>.yamlfile. Target Sys API's resource end point.anypoint-mq.server-urlshould be configured inconfig-<mule.env>.yamlfile. Provide a URL for your instane of the mq server end point.anypoint-mq.client-idshould be configured inconfig-<mule.env>.yamlfile. Provide a client-id for your instance of mq queue name.anypoint-mq.ctms-queue-nameshould be configured inconfig-<mule.env>.yamlfile. Provide a queue name to be used for CTMS job details.anypoint-mq.cdms-queue-nameshould be configured inconfig-<mule.env>.yamlfile. Provide a queue name to be used for CDMS job details.anypoint-mq.msgDelayInSecshould be configured inconfig-<mule.env>.yamlfile. Provide a custom value to delay message publish to the job details queue.anypoint-mq.cdms-polling-intervalInSecshould be configured inconfig-<mule.env>.yamlfile. Provide a custom value to set a polling interval for CDMS queue.anypoint-mq.cdms-polling-sizeshould be configured inconfig-<mule.env>.yamlfile. Provide a custom value to set polling size for CDMS job details queue.
Tested and verified
This solution was developed and tested on Anypoint Studio 7.18.1 and Mule Runtime 4.6.0.
Run it
- Right-click the template project folder.
- Hover your mouse over 'Run as'.
- Click Mule Application (configure).
- Inside the dialog, select Environment and set the variable
mule.envto the appropriate value (dev or local). - Inside the dialog, select Environment and set the variable
mule.keyto the property encryption key that you used to encrypt your secure properties. - Click Run.
Deployment instructions for CloudHub using provided scripts
Ensure the Maven profile CloudHub-HLS-DEV has been properly configured in your settings.xml file. Reference can be found by downloading the Accelerator Common Resources asset. Additional instructions are available in the Getting Started with MuleSoft Accelerators - Build Environment guide.
Update the config-<env>.yaml properties appropriately and then use one of the following scripts to deploy the application to CloudHub:
- packageDeploy.sh (Mac/Linux).
- packageDeploy.cmd (Windows).
Test the template
- Use Advanced Rest Client or Postman to send a request over HTTPS. The template includes a Postman collection in the
src/test/resourcesfolder.